package homework_07.home_01;

public class Car extends Brand {
    private int cent;
    private int days;

    public Car() {
        if (super.getBrand() == 1) {
            this.cent = 800;
        } else this.cent = 300;
    }

    public void setDays(int days) {
        this.days = days;
    }

    public void calculate(){
        int cal;
        cal = cent*days;

        System.out.println("您的租金总共为："+cal);
    }

}
